import request from '@/utils/request'

// 查询优惠卷列表
export function listCard(supplierId) {
  return request({
    url: '/preferen/card/list/'+supplierId,
    method: 'get',
    params: ""
  })
}

// 查询优惠卷详细
export function getCard(preferentialId) {
  return request({
    url: '/preferen/card/' + preferentialId,
    method: 'get'
  })
}

// 新增优惠卷
export function addCard(data) {
  return request({
    url: '/preferen/card',
    method: 'post',
    data: data
  })
}

// 修改优惠卷
export function updateCard(data) {
  return request({
    url: '/preferen/card',
    method: 'put',
    data: data
  })
}

// 删除优惠卷
export function delCard(preferentialId) {
  return request({
    url: '/preferen/card/' + preferentialId,
    method: 'delete'
  })
}

// 导出优惠卷
export function exportCard(query) {
  return request({
    url: '/preferen/card/export',
    method: 'get',
    params: query
  })
}
